home *** CD-ROM | disk | FTP | other *** search
- Path: news.rmii.com!usenet
- From: jcoffin@rmii.com (Jerry Coffin)
- Newsgroups: comp.std.c
- Subject: Re: CLOCKS_PER_SEC not defined
- Date: Fri, 16 Feb 1996 19:17:16 GMT
- Organization: TAEUS
- Message-ID: <4g2gp7$2s2@natasha.rmii.com>
- References: <ramin.1174728902A@news.gsfc.nasa.gov>
- NNTP-Posting-Host: slip22160.rmii.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- ramin@twinkie.gsfc.nasa.gov (Ramin Sina) wrote:
-
- >I am using a supposedly ansi c program in which I write
-
- >#include <time.h>
-
- >#if defined(__STDC__) && !defined(CLOCKS_PER_SEC)
- >#error "CLOCKS_PER_SEC is not defined on this stupid compiler"
- >#endif
-
- >I get the error that CLOCKS_PER_SEC is not defined. I had thought that it
- >was defined in standard C in the time.h header. I need CLOCKS_PER_SEC to
- >time how long it takes for the program to run. Can anybody suggest how I can
- >fix this problem.
-
- You might check for CLK_TCK being defined instead. Prior to the
- standard, and even in early versions of the draft working paper for the
- C standard, this was used instead of CLOCKS_PER_SEC. If memory serves,
- CLK_TCK is also defined in POSIX.
-
-